package com.example.reggie;


import com.example.reggie.common.R;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MyExecutors implements Runnable {

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }

    public static void main(String[] args) {
        ExecutorService threadPool = Executors.newFixedThreadPool(3);
        threadPool.submit(new MyExecutors());
        threadPool.submit(new MyExecutors());
        threadPool.submit(new MyExecutors());
        threadPool.submit(new MyExecutors());
        threadPool.submit(new MyExecutors());

        threadPool.shutdown();



    }

}